GENERAL
OPTIONS The following options control such things as recursion, type of objects to be renamed, mode of operation and console output. These options affect all selectors and actions that are to be performed. ALL RLEVEL SLEVEL DIRPAT PERSISTENTDP FILES DIRS ICONS SELECTED SIMULATE QUIETR QUIET ALL : Sets full recursion. All directories in the directory tree will be entered. It is overridden by RLEVEL and can also be set if the PERSISTENTDP option is given. Example: > SRename Games/a*#? ALL LW : Make all files in "Games" that begin with "a" lowercase in all subdirectories. RLEVEL (RL) <recursion level value> : Sets the level of recursion. If this is 1 only subdirectories in the current directory will be entered. The default recursion level is 0 (no recursion). Example: > SRename Games/a*#? RL 3 LW : Make all files in "Games" that begin with "a" and in subdirectories up to 3 levels deep lowercase. SLEVEL (SL) <starting level value> : Sets the starting level of recursion. Files and directories in a tree level lower than the specified will not be entered. Also sets full recursion if a RLEVEL parameter is not given. The default starting level is 1. Note that the value of SLEVEL can not be greater than the value of RLEVEL. Example: > SRename SYS: UP SL 2 : Make all filenames in SYS: uppercase, except for the filenames in the root directory. DIRPAT (DP) <wildcard pattern> : Determines which directories in a given path are to be entered to rename their contents according to the specified pattern. This parameter implies that recursion is active, if not it sets the level of recursion to 1. Note that the DIRPAT pattern is used only once for the directories that exist in the directory that renaming begins. If you want the DIRPAT pattern to be used all the way when recursing you must give the PERSISTENTDP option. Examples: > SRename Data/#?z DP project#? SU DL : Remove the suffix from all the filenames in "Data" that end with "z" and from the filenames in the subdirectories of "Data" that begin with "project". > SRename SYS:Data/#?z DP project#? ALL SU DL : Same as the previous example but acts on filenames in all subdirectories that are contained in directories that begin with "project". PERSISTENTDP (PD) : Makes the DIRPAT pattern be used with all directories that are encountered, not just with those in the starting level. A directory is entered for renaming to take place, only if it matches the DIRPAT pattern. PERSISTENTDP sets full recursion if the RLEVEL option is not given. Examples: > SRename Data/#?z DP project#? PD SU DL : Remove the suffix from all the filenames in "Data" that end with "z" and in all subdirectories of "Data" that begin with "project". > SRename Data/#?z DP project#? RL 2 SU DL : Same as the previous example but only acts on subdirectories of "Data" that begin with "project" in a depth of up to 2 levels. FILES (FL) : Only files are renamed, directory names are not modified. Example: > SRename Work/Data/ FL UP : Make all the filenames in Work/Data uppercase. Directory names are not renamed. DIRS (DR) : Only directories are renamed, normal filenames are not modified. Example: > SRename Work/Data DR LW : Make all the dirnames in Work/Data lowercase. Filenames are not renamed. If both FILES and DIRS are given only FILES will remain active. ICONS (IC) : When in single or multiple filename mode or in numbering or renumbering mode this keyword makes the icon files (".info" files) to be renamed automatically even if they weren't specified in the filename list. Note that the way this option works is that the icon gets exactly the same filename that was given to the file that the icon accompanies. The icon's filename itself is not taken into account. If the file of the accompanying icon couldn't be found then the icon's filename will not be modified. ICONS can also be used with wildcards. When this happens the wildcard pattern is modified so that it will exclude icon filenames so that icon filenames will not be modified twice. Examples: > SRename tools/lacer tools/prepcard UP IC : Make "lacer" and "prepcard" uppercase including their icon's filenames. output: "lacer" renamed as "LACER" "lacer.info" renamed as "LACER.info" "prepcard" renamed as "PREPCARD" "prepcard.info" renamed as "PREPCARD.info" > SRename tools/p#? UP IC : Make all filenames starting with "p" and their icon's filenames uppercase. output: "PrintFiles" renamed as "PRINTFILES" "PrintFiles.info" renamed as "PRINTFILES.info" "PrepCard" renamed as "PREPCARD" "PrepCard.info" renamed as "PREPCARD.info" > SRename picture1 RN 10 IC : Renumber files from picture1 and up including their icons. output: "picture1" renamed as "picture10" "picture1.info" renamed as "picture10.info" "picture2" renamed as "picture11" "picture2.info" renamed as "picture11.info" "picture3" renamed as "picture12" "picture3.info" renamed as "picture12.info" .... SELECTED (SE) : This option will make SRename only display the filenames that are going to be selected for renaming according to the supplied actions and selectors. It is not guaranteed that the selected filenames will be renamed successfully or that they will be changed from what they were. This option was added to make it easier to find filenames that match specific criteria. It is recommended that you also give the QUIETR (QR) option when using recursion to obtain a more readable output. Note that it is not necessary to also give an action with the selectors but also giving an action makes SELECTED more accurate in reporting which filenames will be renamed. Examples: > SRename C:S#? MT c SE : the selected filenames should begin with "S" and contain "c" output: Selected "Search" Selected "SetClock" Selected "SetPatch" > SRename Miscfiles/ SU SE : the selected filenames should have a suffix output: Selected "startup.iff" Selected "readme.txt" Selected "boing.8svx" Selected "Default.cfg" SIMULATE (SM) : This option will disable real renaming and the resulting filenames or comments will just be displayed. The resulting filenames or comments will not be entirely accurate because the filesystem that is used ultimately affects the final form of the filenames, and since no real renaming is done it's effect will not be shown. It is recommended that you also give the QUIETR (QR) option when using recursion to obtain a more readable output. Example: > SRename C: 8+3 SM output: "AddBuffers" would be renamed as "ADDBUFFE" "AddDataTypes" would be renamed as "ADDDATAT" "Assign" would be renamed as "ASSIGN" "Avail" would be renamed as "AVAIL" "BindDrivers" would be renamed as "BINDDRIV" "Break" would be renamed as "BREAK" "ChangeTaskPri" would be renamed as "CHANGETA" "ConClip" would be renamed as "CONCLIP" "Copy" would be renamed as "COPY" "CPU" would not be changed .... QUIETR (QR) : If given this option stops the directory name that is currently being processed during recursion from being displayed. This can reduce the time required for the renaming operation quite a lot in low powered systems. QUIET (Q) : Suppresses all output including error messages. This option is ignored when SELECTED or SIMULATE is also given. |